<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>新芽后台管理系统</title>
    <link rel="shortcut icon" href="/asserts/images/favicon.ico" type="image/x-icon">
    <link href="http://dd.ddandang.top/css/bootstrap.min.css" rel="stylesheet">
    <link href="/asserts/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/asserts/css/style.min.css" rel="stylesheet">
    <link href="/asserts/css/default.css" rel="stylesheet">
    <link href="/asserts/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/asserts/layui/css/layui.css}">
</head>
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--引入leftNavigation左边导航栏-->
        <div th:include="~{common/module::leftNavigation(flag = 'shopManagement',active='shopList')}"></div>

        <!--头部信息-->
        <div th:include="~{common/module::headerInformation(headerMessage=' 商品管理->商品浏览')}"></div>

        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">

                                <div class="card-toolbar clearfix">
                                    <div class="toolbar-btn-action">
                                        <!--增加商品-->
                                        <button type="button" class="btn btn-primary m-r-5" data-toggle="modal" data-target="#foodsModal">增加商品</button>

                                        <button type="button" class="btn btn-info" id="addGoodsCount" data-toggle="modal" data-target="#addGoodsCountModal">增加库存</button>
                                        <!--增加商品模态框-->
                                        <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" id="foodsModal">
                                            <div class="modal-dialog" role="document">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                                                        <h3 class="modal-title" id="myModalLabel">上架商品</h3>
                                                    </div>
                                                    <div class="modal-body">
                                                        <div class="input-group">
                                                            <span class="input-group-addon">商品名称</span>
                                                            <input type="text" class="form-control" name="goodsName" id="goodsName" placeholder="请输入商品名称：" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))" aria-describedby="basic-addon1">
                                                        </div><br/>
                                                        <div class="input-group">
                                                            <span class="input-group-addon">兑换积分</span>
                                                            <input type="text" class="form-control" name="goodsPrice" id="goodsPrice" placeholder="请输入兑换积分：" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" aria-describedby="basic-addon1">
                                                        </div><br/>
                                                        <div class="input-group">
                                                            <span class="input-group-addon">库存数量</span>
                                                            <input type="text" class="form-control" name="goodsNumber" id="goodsNumber" placeholder="请输入库存数量：" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  aria-describedby="basic-addon1">
                                                        </div><br/>
                                                        <div class="input-group">
                                                            <a href="javascript:;" class="file">选择商品图片
                                                                <input type="file" name="" id="" class="goods_img" accept="image/jpeg,image/png,image/jpg">
                                                            </a>
                                                        </div>
                                                        <div class="input-group">
                                                            <img class="img-avatar img-avatar-200 image" src="" id="image" alt="">
                                                        </div>
                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                        <button type="button" id="addGoods" class="btn btn-primary">增加商品</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <!--增加商品数量模态框-->
                                        <div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel" id="addGoodsCountModal">
                                            <div class="modal-dialog" role="document">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                        <h4 class="modal-title" id="gridSystemModalLabel">增加以下商品数量</h4>
                                                    </div>
                                                    <div class="modal-body">
                                                        <div class="input-group">
                                                            <span class="input-group-addon">商品名称</span>
                                                            <textarea  class="form-control" rows="5" name="name" id="name" disabled="disabled" style="background: white" cols="5"></textarea>
                                                        </div><br/>
                                                        <div class="input-group">
                                                            <span class="input-group-addon">库存数量</span>
                                                            <input type="text" class="form-control" name="goodsCount" id="goodsCount" placeholder="请输入增加的库存数量：" oninput='this.value=this.value.replace(/^[0]+[0-9]*$/gi,"")' onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  aria-describedby="basic-addon1">
                                                        </div><br/>
                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                        <button type="button" class="btn btn-primary" id="confirm">确认增加</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="buttonsToolbar"></div>

                                    </div>
                                </div><br/><br/>

                                <div class="table-responsive">
                                    <table id="goodsList"></table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
</div>
<!--<iframe src="/addGoodsIframe" frameborder="0"></iframe>-->
<script type="text/javascript" src="http://dd.ddandang.top/js/jquery-3.5.0.min.js"></script>
<script type="text/javascript" src="/asserts/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/asserts/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/asserts/js/index.min.js"></script>
<script type="text/javascript" src="/asserts/js/default.js"></script>
<script type="text/javascript" src="/asserts/js/bootstrap-table/bootstrap-table.js"></script>
<script type="text/javascript" src="/asserts/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script th:src="@{/asserts/layui/layui.js}"></script>
<script type="text/javascript" src="/asserts/js/addGoods.js"></script>
</body>
</html>